$(function(){
	$('#TrainingPlantable').datagrid({    
		 url:'TrainingCoursetable', //数据源地址
	    columns:[[    
	    	{field:'number',fixed:false,width:213,title:'课程编号'},    
	        {field:'names',fixed:false,width:213,title:'课程名称'},    
	        {field:'bumen',fixed:false,width:213,title:'培训老师'},
	        {field:'shenpiren',fixed:false,width:213,title:'课程时长'},
	        {field:'dates',fixed:false,width:213,title:'创建日期'} ,
	        {field:'caozuo',fixed:false,width:213,formatter:operate_formatter,title:'操作'} 
	        
			    
	    ]],
	    toolbar:'#TrainingPlantable',
	    pagination:true,
	    pageNumber:1,
	    pageSize:5,
	    pageList:[5,10,15] 
	}); 
	//在每个操作列里面添加编辑，查看，明细，删除
	function operate_formatter(value, row, index) {
       return "<a href='#' class='easyui-linkbutton'>编辑</a>/\
       <a href='#' class='easyui-linkbutton'>删除</a> ";
   }
	//点击新增按钮弹框
	$("#addTrainingCourse").click(function(){
		$("#addTrainingCourse_win").window("open");
	})
})